package com.example.shw.opengl

import android.opengl.GLSurfaceView
import android.os.Bundle
import android.support.v7.app.AppCompatActivity

class OpenGlActivity : AppCompatActivity(){
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        //创建一个GLSurfaceView，用来显示OpenGL绘制的图形
        val glView = GLSurfaceView(this)
        //创建GLSurfaceView的内容绘制器
        val myRender = MyRenderer()
        //为GLSurfaceView设置绘制器
        glView.setRenderer(myRender)
        setContentView(glView)
    }
}